package com.byq.mm.smartlib.obd.commands.decoder.temperature;

import com.byq.mm.smartlib.obd.commands.decoder.CommandDecoder;

abstract public class TemperatureDecoder extends CommandDecoder {
	static public final String TEMPERATURE = "Temperature";
	public TemperatureDecoder(byte sidrp, byte pid) {
		super(sidrp, pid);
		
	}

	@Override
	public String getGroup() {
		return TEMPERATURE;
	}

	@Override
	public double getValue() {
		return getA() - 40;
		
	}
	@Override
	public double getMax() {

		return 215;
	}
	@Override
	public double getMin() {

		return -40;
	}
	@Override
	protected int responseLength() {
		// TODO Auto-generated method stub
		return 3;
	}

	@Override
	public String getUnit() {
		// TODO Auto-generated method stub
		return "C";
	}
}
